home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 11 / CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso / s / allcaps.pprx < prev    next >
Text File  |  1992-03-14  |  1KB  |  50 lines

  1. /*
  2. @BAllCaps  @P@ICopyright Gold Disk Inc., February, 1992
  3.  
  4. This Genie will capitalize every letter in a block of text.
  5. */
  6. if ~show(l, "gdarexxsupport.library") then
  7.     if ~(exists("libs:gdarexxsupport.library") & addlib("gdarexxsupport.library", 0, -30)) then
  8.    exit_msg("Please install the gdarexxsupport.library in your libs: directory before running this Genie")
  9.  
  10. if word(ppm_GetState(), 1) ~= "3" then
  11.     exit_msg("This Genie works only in edit mode!!")
  12.  
  13. text   = ppm_GetBlockText(1)
  14. if text  = '' then exit_msg("No block selected")
  15.  
  16. i = 1
  17. len = length(text)
  18. call ppm_ShowStatus("Working...")
  19. do while i < len
  20.  
  21.     curletter = substr(text, i, 1)
  22.     do while curletter = '\' 
  23.        i = skipcodes(text, i)
  24.        curletter = substr(text, i, 1)
  25.     end
  26.     if curletter = ' ' then
  27.     do
  28.        i = i + 1
  29.        iterate
  30.     end
  31.  
  32.     text = overlay(upper(curletter), text, i)
  33.  
  34.     i = i + 1
  35.  
  36. end
  37. call ppm_InsertText(text)
  38. call ppm_ClearStatus()
  39. exit
  40.  
  41. exit_msg:
  42. do
  43.     parse arg msg
  44.  
  45.     call ppm_ShowStatus(msg)
  46.     exit
  47. end
  48.  
  49.  
  50.